
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<!-- 个人信息Modal框   用户个人信息查看和修改-->
<div th:fragment="userModal">
<div class="modal fade" id="userInfo" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" >
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <div class="row">
                    <div class="col-md-12" style="text-align: center">
                        <img src="pic/user2_icon.png">
                    </div>
                </div>
                <div class="row">
                    <div class="col-md-12" style="text-align: center">
                        <p style="font-family: Microsoft YaHei;font-size: 15px">{{ userdata.user_truename }}</p>
                    </div>
                </div>
            </div>

            <!-- 操作信息提示框 -->
            <div class="alert alert-danger alert-dismissable fade hide" role="alert">
                <strong>操作失败！</strong>{{ message.info }}，请重试！
            </div>
            <div class="alert alert-success alert-dismissable fade hide" role="alert">
                <strong>操作成功！</strong>{{ message.info }},页面将会自动刷新！
            </div>


            <div class="modal-body">
                <div class="row" style="height:40px" v-if="userN_display">
                    <div class="col-md-8"><label>姓  名：</label><span>{{ userdata.user_truename }}</span></div>
                    <div class="col-md-4" style="text-align: center">
                        <button type="button" class="btn btn-info btn-xs" @click="openChangeN">修改</button>
                    </div>
                </div>
                <div class="row" style="height:40px" v-else><!-- 点击修改以后出现的修改页面 -->
                    <div class="col-md-2">
                        <label>姓  名：</label>
                    </div>
                    <div class="col-md-6">
                        <input type="text" class="form-control input-sm" style="width:150px;height:27px" placeholder="姓名长度不超过10位" v-model="userInfo_change_name">
                    </div>
                    <div class="col-md-4" style="text-align: center">
                        <button type="button" class="btn btn-default btn-xs" @click="cancelChangeN">取消</button>&nbsp&nbsp
                        <button type="button" class="btn btn-primary btn-xs" @click="changeUserName">确认</button>
                    </div>
                </div>

                <hr>

                <div class="row" style="height:40px" v-if="userP_display">
                    <div class="col-md-8"><label>电  话：</label><span>{{ userdata.user_phone }}</span></div>
                    <div class="col-md-4" style="text-align: center">
                        <button type="button" class="btn btn-info btn-xs" @click="openChangeP">修改</button>
                    </div>
                </div>
                <div class="row" style="height:40px" v-else><!-- 点击修改以后出现的修改页面 -->
                    <div class="col-md-2">
                        <label>电  话：</label>
                    </div>
                    <div class="col-md-6">
                        <input type="text" class="form-control input-sm" style="width:150px;height:27px" placeholder="电话号码不超过11位" v-model="userInfo_change_phone">
                    </div>
                    <div class="col-md-4" style="text-align: center">
                        <button type="button" class="btn btn-default btn-xs" @click="cancelChangeP">取消</button>&nbsp&nbsp
                        <button type="button" class="btn btn-primary btn-xs" @click="changeUserPhone">确认</button>
                    </div>
                </div>

                <hr>

                <div class="row" style="height:40px"><!-- user_name就是用户登录用的邮箱，这个命名有点不恰当，但是因为历史原因改起来好麻烦就不改了 T_T -->
                    <div class="col-md-8"><label>邮  箱：</label><span>{{ userdata.user_name }}</span></div>
                </div>
                <hr>
                <div class="row" style="height:40px">
                    <div class="col-md-8"><label>所 属 部 门：</label><span>{{ userdata.user_department }}</span></div>
                </div>
                <hr>
                <div class="row" style="height:40px"><!-- 也就是用户的权限 -->
                    <div class="col-md-8"><label>职  能：</label><span>{{ userdata.user_position }}</span></div>
                </div>
            </div>

            <hr>

            <div class="modal-body">
                <div class="row" v-if="user_pwd_change">
                    <div class="col-md-12" style="text-align: center">
                        <a @click="openPwdChange">更改密码</a>
                    </div>
                </div>
                <div v-else><!-- 点击更改密码以后出现的修改页面 -->
                    <div class="row">
                        <form class="form-horizontal">
                            <div class="form-group">
                                <label class="col-sm-2 control-label">原密码</label>
                                <div class="col-sm-10">
                                    <input type="password" class="form-control" style="width:255px" placeholder=""  v-model="userInfo_change_old_pwd" required="required" pattern="^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]{6,16}$">
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">新密码</label>
                                <div class="col-sm-10">
                                    <input type="password" class="form-control" style="width:255px" placeholder="6-16位，大小写字母和数字组合" v-model="userInfo_change_new_pwd" required="required" pattern="^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]{6,16}$">
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">确认密码</label>
                                <div class="col-sm-10">
                                    <input type="password" class="form-control" style="width:255px" placeholder="" v-model="userInfo_change_sure_pwd" required="required" pattern="^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]{6,16}$">
                                </div>
                            </div>


                            <div class="form-group">
                                <div class="col-sm-12" style="text-align: center">
                                    <button type="button" class="btn btn-default" @click="cancelChangePwd">取消</button>
                                    <button type="button" class="btn btn-primary" @click="changeUserPwd">确认</button>
                                </div>
                            </div>
                        </form>
                    </div>
                </div>
            </div>

            <div class="modal-footer">
                <button type="button" class="btn btn-danger" data-dismiss="modal" @click="turnoff">关闭</button>
                <!--         <button type="button" class="btn btn-primary">保存</button> -->
            </div>
        </div>
    </div>
</div>
</div>
<!-- 用户信息修改用modal框 -->
<div th:fragment="userChangeModal">
    <div class="modal fade" tabindex="-1" role="dialog" id="userChangeModal">
        <div class="modal-dialog" role="document">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                    <h4 class="modal-title">用户信息修改</h4>
                </div>

                <!-- 操作信息提示框 -->
                <div class="alert alert-danger alert-dismissable fade hide" role="alert" id="changeUserF">
                    <strong>操作失败！</strong>,{{ message.info }}，请重试！
                </div>

                <div class="alert alert-success alert-dismissable fade hide" role="alert" id="changeUserS">
                    <strong>操作成功！</strong>,{{ message.info }}！
                </div>

                <div class="modal-body">
                    <form>
                        <div class="form-group">
                            <label>用户邮箱:{{ tempUserInfo.user_name }}</label>
                        </div>
                        <div class="form-group">
                            <label>用户姓名:{{ tempUserInfo.user_truename }}</label>
                            <input type="text" class="form-control" placeholder="name" v-model="tempUserInfo.user_truename">
                        </div>
                        <div class="form-group">
                            <label>用户电话:{{ tempUserInfo.user_phone }}</label>
                            <input type="text" class="form-control" placeholder="phone" v-model="tempUserInfo.user_phone">
                        </div>
                        <div class="form-group">
                            <label>用户部门:{{ tempUserInfo.user_department }}</label>
                            <input type="text" class="form-control" placeholder="department" v-model="tempUserInfo.user_department">
                        </div>
                        <div class="form-group">
                            <label v-if="tempUserInfo.user_authority == 1">用户职能:普通人员</label>
                            <label v-else-if="tempUserInfo.user_authority == 3">用户职能:财务人员</label>
                            <label v-else>用户职能:管理员</label>
                            <br>
                            <label class="radio-inline">
                                <input type="radio" name="C_auth" value=1 v-model="tempUserInfo.user_authority"> 普通人员
                            </label>
                            <label class="radio-inline">
                                <input type="radio" name="C_auth" value=3 v-model="tempUserInfo.user_authority"> 财务人员
                            </label>
                            <label class="radio-inline">
                                <input type="radio" name="C_auth" value=7 v-model="tempUserInfo.user_authority"> 管理员
                            </label>
                        </div>
                    </form>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                    <button type="button" class="btn btn-primary" @click="changeUser">保存修改</button>
                </div>
            </div>
        </div>
    </div>
</div>
<!-- 添加用户用modal框 -->
<div th:fragment="addUserModal">
    <div class="modal fade" tabindex="-1" role="dialog" id="addUserModal">
        <div class="modal-dialog" role="document">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close" @click="clearInput"><span aria-hidden="true">&times;</span></button>
                    <h4 class="modal-title">添加新用户</h4>
                </div>

                <!-- 操作信息提示框 -->
                <div class="alert alert-danger alert-dismissable fade hide" role="alert" id="addUserF">
                    <strong>操作失败！</strong>{{ message.info }}，请重试！
                </div>

                <div class="alert alert-success alert-dismissable fade hide" role="alert" id="addUserS">
                    <strong>操作成功！</strong>{{ message.info }}！
                </div>

                <div class="modal-body">
                    <form class="form-horizontal">
                        <div class="form-group">
                            <label class="col-sm-2 control-label">用户邮箱*</label>
                            <div class="col-sm-6">
                                <div class="input-group">
                                    <input type="email" class="form-control"  placeholder="Email" v-model="addUser.user_name" @blur="isInputEmpty()">
                                    <span class="input-group-addon" id="basic-addon2">@office.com</span>
                                </div>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">用户密码*</label>
                            <div class="col-sm-6">
                                <input type="password" class="form-control" placeholder="Password" v-model="addUser.user_password" @blur="isInputEmpty()">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">用户姓名*</label>
                            <div class="col-sm-6">
                                <input type="email" class="form-control"  placeholder="name" v-model="addUser.user_truename" @blur="isInputEmpty()" >
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">用户电话</label>
                            <div class="col-sm-6">
                                <input type="email" class="form-control"  placeholder="phone" v-model="addUser.user_phone">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">用户部门*</label>
                            <div class="col-sm-6">
                                <input type="email" class="form-control"  placeholder="department" v-model="addUser.user_department" @blur="isInputEmpty()" >
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">用户职能*</label>
                            <div class="col-sm-9">
                                <label class="radio-inline">
                                    <input type="radio" name="A_auth" value=1 v-model="addUser.user_authority"> 普通人员
                                </label>
                                <label class="radio-inline">
                                    <input type="radio" name="A_auth" value=3 v-model="addUser.user_authority"> 财务人员
                                </label>
                                <label class="radio-inline">
                                    <input type="radio" name="A_auth" value=7 v-model="addUser.user_authority"> 管理员
                                </label>
                            </div>
                        </div>
                    </form>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default" data-dismiss="modal" @click="clearInput">关闭</button>
                    <button type="button" class="btn btn-primary" disabled="disabled" id="add" @click="addNewUser">添加</button>
                </div>
            </div>
        </div>
    </div>
</div>
<!--申请物品modal框-->
<div th:fragment="applyModal">
    <div class="modal fade bs-example-modal-sm" id="applyModal" tabindex="-1" role="dialog" aria-labelledby="mySmallModalLabel">
        <div class="modal-dialog modal-sm" role="document">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                    <h4 class="modal-title" id="myModalLabel">物品申请</h4>
                </div>

                <!-- 操作信息提示框 -->
                <div class="alert alert-danger alert-dismissable fade hide" role="alert" id="addApplyF">
                    <strong>操作失败！</strong>{{ message.info }}
                </div>

                <div class="alert alert-success alert-dismissable fade hide" role="alert" id="addApplyS">
                    <strong>操作成功！</strong>{{ message.info }}！
                </div>

                <div class="modal-body">
                    <form>
                        <div class="form-group">
                            <label>物品名称：{{ tempProductInfo.product_name }}</label><br>
                            <label>物品库存：{{ tempProductInfo.product_num }}</label><br>
                            <label>申请数量：{{ tempProductInfo.apply_num }}</label><br>
                            <div class="row">
                                <div class="col-lg-7 center-block">
                                    <div class="input-group">
                                        <span class="input-group-btn">
                                            <button class="btn btn-default" type="button" @click="tempProductInfo.apply_num--" v-if="tempProductInfo.apply_num>1">-</button>
                                            <button class="btn btn-default" type="button" @click="tempProductInfo.apply_num--" disabled="disabled" v-else>-</button>
                                        </span>
                                        <input type="text" class="form-control" placeholder="" v-model="tempProductInfo.apply_num">
                                        <span class="input-group-btn">
                                            <button class="btn btn-default"  type="button" @click=" tempProductInfo.apply_num++" v-if="tempProductInfo.apply_num<tempProductInfo.product_num">+</button>
                                            <button class="btn btn-default"  type="button" @click=" tempProductInfo.apply_num++" disabled="disabled" v-else>+</button>
                                        </span>
                                    </div>
                                </div>
                            </div>

                           <!-- <input type="text" class="form-control"  placeholder="product num" >-->
                        </div>
                    </form>
                </div>

                <div class="modal-footer">
                    <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                    <button type="button" class="btn btn-primary" id="submitApply" v-if="tempProductInfo.apply_num<=tempProductInfo.product_num?tempProductInfo.apply_num>=1:false" @click="submitApply">提交申请</button>
                    <button type="button" class="btn btn-primary" disabled="disabled" v-else>提交申请</button>
                </div>
            </div>
        </div>
    </div>
</div>
<!--修改物品modal框-->
<div th:fragment="changeProductModal">
    <div class="modal fade" tabindex="-1" role="dialog" id="changeProduct">
        <div class="modal-dialog" role="document">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close" @click="clearTemp"><span aria-hidden="true">&times;</span></button>
                    <h4 class="modal-title">修改物品信息</h4>
                </div>

                <!-- 操作信息提示框 -->
                <div class="alert alert-danger alert-dismissable fade hide" role="alert" id="changeProductF">
                    <strong>操作失败！</strong>{{ message.info }}
                </div>

                <div class="alert alert-success alert-dismissable fade hide" role="alert" id="changeProductS">
                    <strong>操作成功！</strong>{{ message.info }}！
                </div>

                <div class="modal-body">
                    <form>
                        <div class="form-group">
                            <label>物品名称:{{ tempProductInfo.product_name }}</label>
                            <input type="text" class="form-control" placeholder="name" v-model="tempProductInfo.product_name">
                        </div>
                        <hr>
                        <div class="form-group">
                            <label>物品类型:{{ tempProductInfo.product_type }}</label>
                            <select class="form-control" data-live-search="true" v-model="tempProductInfo.product_type" >
                                <option v-for="type in Types">{{type}}</option>
                            </select>
                        </div>
                        <hr>
                        <div class="form-group">
                            <label>物品价格:￥{{ tempProductInfo.product_price }}</label>
                            <input type="text" class="form-control" placeholder="price" v-model="tempProductInfo.product_price">
                        </div>
                        <hr>
                        <div class="form-group">
                            <label>物品数量:{{ tempProductInfo.product_num }}</label>
                            <div class="row">
                                <div class="col-lg-7 center-block">
                                    <div class="input-group">
                                        <span class="input-group-btn">
                                            <button class="btn btn-default" type="button" @click="tempProductInfo.product_num--" v-if="tempProductInfo.product_num>1">-</button>
                                            <button class="btn btn-default" type="button" @click="tempProductInfo.product_num--" disabled="disabled" v-else>-</button>
                                        </span>
                                        <input type="text" class="form-control" placeholder="" v-model="tempProductInfo.product_num">
                                        <span class="input-group-btn">
                                            <button class="btn btn-default"  type="button" @click="tempProductInfo.product_num++" v-if="tempProductInfo.product_num<999">+</button>
                                            <button class="btn btn-default"  type="button" @click="tempProductInfo.product_num++" disabled="disabled" v-else>+</button>
                                        </span>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </form>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default" data-dismiss="modal" @click="clearTemp">关闭</button>
                    <button type="button" class="btn btn-primary" @click="changeP">保存</button>
                </div>
            </div><!-- /.modal-content -->
        </div><!-- /.modal-dialog -->
    </div><!-- /.modal -->

</div>
<!--增加物品modal框-->
<div th:fragment="addProductModal">
    <div class="modal fade" tabindex="-1" role="dialog" id="addProduct">
        <div class="modal-dialog" role="document">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close" @click="clearTemp"><span aria-hidden="true">&times;</span></button>
                    <h4 class="modal-title">添加新物品</h4>
                </div>

                <!-- 操作信息提示框 -->
                <div class="alert alert-danger alert-dismissable fade hide" role="alert" id="addProductF">
                    <strong>操作失败！</strong>{{ message.info }}，请重试！
                </div>
                <div class="alert alert-success alert-dismissable fade hide" role="alert" id="addProductS">
                    <strong>操作成功！</strong>{{ message.info }},页面将会自动刷新！
                </div>

                <div class="modal-body">
                    <form>
                        <div class="form-group">
                            <label>物品名称:{{ tempProductInfo.product_name }}</label>
                            <input type="text" class="form-control" placeholder="name" v-model="tempProductInfo.product_name">
                        </div>
                        <hr>
                        <div class="form-group">
                            <label>物品类型:{{ tempProductInfo.product_type }}</label>
                            <select class="form-control" v-model="tempProductInfo.product_type">
                                <option v-for="type in Types">{{type}}</option>
                            </select>
                        </div>
                        <hr>
                        <div class="form-group">
                            <label>物品价格:￥{{ tempProductInfo.product_price }}</label>
                            <input type="text" class="form-control" placeholder="price" v-model="tempProductInfo.product_price">
                        </div>
                        <hr>
                        <div class="form-group">
                            <label>物品数量:{{ tempProductInfo.product_num }}</label>
                            <div class="row">
                                <div class="col-lg-7 center-block">
                                    <div class="input-group">
                                        <span class="input-group-btn">
                                            <button class="btn btn-default" type="button" @click="tempProductInfo.product_num--" v-if="tempProductInfo.product_num>1">-</button>
                                            <button class="btn btn-default" type="button" @click="tempProductInfo.product_num--" disabled="disabled" v-else>-</button>
                                        </span>
                                        <input type="text" class="form-control" placeholder="" v-model="tempProductInfo.product_num">
                                        <span class="input-group-btn">
                                            <button class="btn btn-default"  type="button" @click="tempProductInfo.product_num++" v-if="tempProductInfo.product_num<999">+</button>
                                            <button class="btn btn-default"  type="button" @click="tempProductInfo.product_num++" disabled="disabled" v-else>+</button>
                                        </span>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </form>

                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default" data-dismiss="modal" @click="clearTemp">关闭</button>
                    <button type="button" class="btn btn-primary" @click="addNewProduct">保存</button>
                </div>
            </div><!-- /.modal-content -->
        </div><!-- /.modal-dialog -->
    </div><!-- /.modal -->

</div>
<!--删除物品确认modal框-->
<div th:fragment="deleteProductModal">

    <div class="modal fade bs-example-modal-sm" id="deleteProductModal" tabindex="-1" role="dialog" aria-labelledby="mySmallModalLabel">
        <div class="modal-dialog modal-sm" role="document">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close" @click="clearTemp"><span aria-hidden="true">&times;</span></button>
                    <h4 class="modal-title">确认删除该物品？</h4>
                </div>

                <!-- 操作信息提示框 -->
                <div class="alert alert-danger alert-dismissable fade hide" role="alert" id="deleteProductF">
                    <strong>操作失败！</strong>{{ message.info }}
                </div>

                <div class="alert alert-success alert-dismissable fade hide" role="alert" id="deleteProductS">
                    <strong>操作成功！</strong>{{ message.info }}！
                </div>

                <div class="modal-body">
                    <form>
                        <div class="form-group">
                            <label>物品名称：{{ tempProductInfo.product_name }}</label><br>
                            <label>物品库存：{{ tempProductInfo.product_num }}</label><br>
                            <label>物品价格：￥{{ tempProductInfo.product_price }}</label><br>
                            <label>物品类型：{{ tempProductInfo.product_type }}</label><br>
                        </div>
                    </form>
                </div>

                <div class="modal-footer">
                    <button type="button" class="btn btn-default" data-dismiss="modal" @click="clearTemp">取消</button>
                    <button type="button" class="btn btn-danger" @click="deleteProductS">确认删除</button>
                </div>
            </div>
        </div>
    </div>

</div>

<!--增加物品类型modal框-->
<div th:fragment="addTypeModal">

    <div class="modal fade" tabindex="-1" role="dialog" id="addTypeModal">
        <div class="modal-dialog" role="document">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close" @click="clearTemp"><span aria-hidden="true">&times;</span></button>
                    <h4 class="modal-title">增加类型</h4>
                </div>

                <!-- 操作信息提示框 -->
                <div class="alert alert-danger alert-dismissable fade hide" role="alert" id="addTypeF">
                    <strong>操作失败！</strong>{{ message.info }}
                </div>
                <div class="alert alert-success alert-dismissable fade hide" role="alert" id="addTypeS">
                    <strong>操作成功！</strong>{{ message.info }}！
                </div>

                <div class="modal-body">
                    <div class="form-group">
                        <label>分类:{{ tempTypeInfo.type_category }}</label>
                        <select class="form-control" v-model="tempTypeInfo.type_category">
                            <option>文具事务用品</option>
                            <option>办公耗材</option>
                            <option>办公设备</option>
                        </select>
                    </div>
                    <hr>
                    <div class="form-group">
                        <label>类型:{{ tempTypeInfo.product_type }}</label>
                        <input type="text" class="form-control" placeholder="type" v-model="tempTypeInfo.product_type">
                    </div>

                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default" data-dismiss="modal" @click="clearTemp">关闭</button>
                    <button type="button" class="btn btn-primary" @click="addNewType">确定</button>
                </div>
            </div><!-- /.modal-content -->
        </div><!-- /.modal-dialog -->
    </div><!-- /.modal -->

</div>
<!--删除物品类型modal框-->
<div th:fragment="deleteTypeModal">

    <div class="modal fade bs-example-modal-sm" id="deleteTypeModal" tabindex="-1" role="dialog" aria-labelledby="mySmallModalLabel">
        <div class="modal-dialog modal-sm" role="document">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close" @click="clearTemp"><span aria-hidden="true">&times;</span></button>
                    <h4 class="modal-title">确认删除该类型？</h4>
                </div>

                <!-- 操作信息提示框 -->
                <div class="alert alert-danger alert-dismissable fade hide" role="alert" id="deleteTypeF">
                    <strong>操作失败！</strong>{{ message.info }}
                </div>
                <div class="alert alert-success alert-dismissable fade hide" role="alert" id="deleteTypeS">
                    <strong>操作成功！</strong>{{ message.info }}！
                </div>

                <div class="modal-body">
                    类型：{{ tempTypeInfo.product_type }}
                </div>

                <div class="modal-footer">
                    <button type="button" class="btn btn-default" data-dismiss="modal" @click="clearTemp">取消</button>
                    <button type="button" class="btn btn-danger"  @click="deleteType">确认删除</button>
                </div>
            </div>
        </div>
    </div>

</div>

<!--申请审核确认modal框-->
<div th:fragment="applyCheckModal">
    <!--审核通过modal框-->
    <div class="modal fade bs-example-modal-sm" id="passApplyModal" tabindex="-1" role="dialog" aria-labelledby="mySmallModalLabel">
        <div class="modal-dialog modal-sm" role="document">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close" @click="clearTemp"><span aria-hidden="true">&times;</span></button>
                    <h4 class="modal-title">确认通过该申请？</h4>
                </div>

                <!-- 操作信息提示框 -->
                <div class="alert alert-danger alert-dismissable fade hide" role="alert" id="passApplyF">
                    <strong>操作失败！</strong>{{ message.info }}
                </div>
                <div class="alert alert-success alert-dismissable fade hide" role="alert" id="passApplyS">
                    <strong>操作成功！</strong>{{ message.info }}！
                </div>

                <div class="modal-body">
                    <div class="form-group">
                        <label>申请人：{{ tempApplyCheckInfo.apply_user_truename }}</label><br>
                        <label>申请物品：{{ tempApplyCheckInfo.apply_product_name }}</label><br>
                        <label>申请数量：{{ tempApplyCheckInfo.apply_num }}</label><br>
                        <label>申请金额：￥{{ tempApplyCheckInfo.apply_product_price }}</label><br>
                        <label>审核人：{{ tempApplyCheckInfo.apply_passman_name }}</label><br>
                    </div>
                </div>

                <div class="modal-footer">
                    <button type="button" class="btn btn-default" data-dismiss="modal" @click="clearTemp">取消</button>
                    <button type="button" class="btn btn-danger" @click="passA" >确认通过</button>
                </div>
            </div>
        </div>
    </div>

    <!--审核驳回modal框-->
    <div class="modal fade bs-example-modal-sm" id="rejectApplyModal" tabindex="-1" role="dialog" aria-labelledby="mySmallModalLabel">
        <div class="modal-dialog modal-sm" role="document">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close" @click="clearTemp"><span aria-hidden="true">&times;</span></button>
                    <h4 class="modal-title">确认驳回该申请？</h4>
                </div>

                <!-- 操作信息提示框 -->
                <div class="alert alert-danger alert-dismissable fade hide" role="alert" id="rejectApplyF">
                    <strong>操作失败！</strong>{{ message.info }}
                </div>
                <div class="alert alert-success alert-dismissable fade hide" role="alert" id="rejectApplyS">
                    <strong>操作成功！</strong>{{ message.info }}！
                </div>

                <div class="modal-body">
                    <div class="form-group">
                        <label>申请人：{{ tempApplyCheckInfo.apply_user_truename }}</label><br>
                        <label>申请物品：{{ tempApplyCheckInfo.apply_product_name }}</label><br>
                        <label>申请数量：{{ tempApplyCheckInfo.apply_num }}</label><br>
                        <label>申请金额：￥{{ tempApplyCheckInfo.apply_product_price }}</label><br>
                        <label>审核人：{{ tempApplyCheckInfo.apply_passman_name }}</label><br>
                    </div>
                </div>

                <div class="modal-footer">
                    <button type="button" class="btn btn-default" data-dismiss="modal" @click="clearTemp">取消</button>
                    <button type="button" class="btn btn-danger" @click="rejectA" >确认驳回</button>
                </div>
            </div>
        </div>
    </div>
</div>

<!--删除申请记录确认modal框-->
<div th:fragment="daleteApplyModal">
    <div class="modal fade bs-example-modal-sm" id="deleteApplyModal" tabindex="-1" role="dialog" aria-labelledby="mySmallModalLabel">
        <div class="modal-dialog modal-sm" role="document">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close" @click="clearTemp"><span aria-hidden="true">&times;</span></button>
                    <h4 class="modal-title">确认删除该申请记录？</h4>
                </div>

                <!-- 操作信息提示框 -->
                <div class="alert alert-danger alert-dismissable fade hide" role="alert" id="deleteApplyF">
                    <strong>操作失败！</strong>{{ message.info }}
                </div>
                <div class="alert alert-success alert-dismissable fade hide" role="alert" id="deleteApplyS">
                    <strong>操作成功！</strong>{{ message.info }}！
                </div>

                <div class="modal-body">
                    <div class="form-group">
                        <label>申 请 人 ：{{ tempApplyCheckInfo.apply_user_truename }}</label><br>
                        <label>申请物品：{{ tempApplyCheckInfo.apply_product_name }}</label><br>
                        <label>申请数量：{{ tempApplyCheckInfo.apply_num }}</label><br>
                        <label>申请金额：￥{{ tempApplyCheckInfo.apply_product_price }}</label><br>
                        <label>审 核 人 ：{{ tempApplyCheckInfo.apply_passman_name }}</label><br>
                        <label>审核时间：{{ tempApplyCheckInfo.apply_time }}</label><br>
                    </div>
                </div>

                <div class="modal-footer">
                    <button type="button" class="btn btn-default" data-dismiss="modal" @click="clearTemp">取消</button>
                    <button type="button" class="btn btn-danger" @click="deleteApply" >确认删除</button>
                </div>
            </div>
        </div>
    </div>
</div>

<!--借入记录归还、挂失、删除modal框-->
<div th:fragment="borrowModal">
    <!--归还确认modal框-->
    <div class="modal fade bs-example-modal-sm" id="borrowReturnModal" tabindex="-1" role="dialog" aria-labelledby="mySmallModalLabel">
        <div class="modal-dialog modal-sm" role="document">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close" @click="clearTemp"><span aria-hidden="true">&times;</span></button>
                    <h4 class="modal-title">确认已归还物品？</h4>
                </div>

                <!-- 操作信息提示框 -->
                <div class="alert alert-danger alert-dismissable fade hide" role="alert" id="borrowReturnF">
                    <strong>操作失败！</strong>{{ message.info }}
                </div>
                <div class="alert alert-success alert-dismissable fade hide" role="alert" id="borrowReturnS">
                    <strong>操作成功！</strong>{{ message.info }}！
                </div>

                <div class="modal-body">
                    <div class="form-group">
                        <label>姓名：{{ tempBorrowListInfo.borrowinfo_user_truename }}</label><br>
                        <label>借入物品：{{ tempBorrowListInfo.borrowinfo_product_name }}</label><br>
                        <label>数量：{{ tempBorrowListInfo.borrowinfo_num }}</label><br>
                        <label>单价：￥{{ tempBorrowListInfo.borrowinfo_product_price }}</label><br>
                        <label>总金额：￥{{ tempBorrowListInfo.borrowinfo_product_price*tempBorrowListInfo.borrowinfo_num }}</label><br>
                        <label>损失金额：￥{{ missPrice }}</label>
                        <label>借入时间：{{ tempBorrowListInfo.borrowinfo_time }}</label><br>
                        <label>归还数量：{{ tempBorrowListInfo.borrowinfo_return_num }}</label>
                        <div class="row">
                            <div class="col-lg-6 center-block">
                                <div class="input-group">
                                        <span class="input-group-btn">
                                            <button class="btn btn-default" type="button" @click="tempBorrowListInfo.borrowinfo_return_num--" v-if="tempBorrowListInfo.borrowinfo_return_num>1">-</button>
                                            <button class="btn btn-default" type="button" disabled="disabled" v-else>-</button>
                                        </span>
                                    <input type="text" class="form-control" placeholder="" v-model="tempBorrowListInfo.borrowinfo_return_num">
                                    <span class="input-group-btn">
                                            <button class="btn btn-default"  type="button" @click=" tempBorrowListInfo.borrowinfo_return_num++" v-if="tempBorrowListInfo.borrowinfo_return_num<tempBorrowListInfo.borrowinfo_num">+</button>
                                            <button class="btn btn-default"  type="button" disabled="disabled" v-else>+</button>
                                        </span>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>

                <div class="modal-footer">
                    <button type="button" class="btn btn-default" data-dismiss="modal" @click="clearTemp">取消</button>
                    <button type="button" class="btn btn-danger" v-if="tempBorrowListInfo.borrowinfo_missprice<(tempBorrowListInfo.borrowinfo_num*tempBorrowListInfo.borrowinfo_product_price)
&& tempBorrowListInfo.borrowinfo_missprice>=0" @click="returnBorrowList">确认归还</button>
                    <button type="button" class="btn btn-danger" disabled="disabled" v-else>确认归还</button>
                </div>
            </div>
        </div>
    </div>

    <!--挂失确认modal框-->
    <div class="modal fade bs-example-modal-sm" id="borrowMissModal" tabindex="-1" role="dialog" aria-labelledby="mySmallModalLabel">
        <div class="modal-dialog modal-sm" role="document">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close" @click="clearTemp"><span aria-hidden="true">&times;</span></button>
                    <h4 class="modal-title">确认挂失物品？</h4>
                </div>

                <!-- 操作信息提示框 -->
                <div class="alert alert-danger alert-dismissable fade hide" role="alert" id="borrowMissF">
                    <strong>操作失败！</strong>{{ message.info }}
                </div>
                <div class="alert alert-success alert-dismissable fade hide" role="alert" id="borrowMissS">
                    <strong>操作成功！</strong>{{ message.info }}！
                </div>

                <div class="modal-body">
                    <div class="form-group">
                        <label>姓名：{{ tempBorrowListInfo.borrowinfo_user_truename }}</label><br>
                        <label>借入物品：{{ tempBorrowListInfo.borrowinfo_product_name }}</label><br>
                        <label>数量：{{ tempBorrowListInfo.borrowinfo_num }}</label><br>
                        <label>单价：￥{{ tempBorrowListInfo.borrowinfo_product_price }}</label><br>
                        <label>损失金额：￥{{ tempBorrowListInfo.borrowinfo_missprice }}</label>
                        <label>借入时间：{{ tempBorrowListInfo.borrowinfo_time }}</label><br>
                    </div>
                </div>

                <div class="modal-footer">
                    <button type="button" class="btn btn-default" data-dismiss="modal" @click="clearTemp">取消</button>
                    <button type="button" class="btn btn-danger"  @click="missBorrowList">确认挂失</button>
                </div>
            </div>
        </div>
    </div>
    <!--删除确认modal框-->
    <div class="modal fade bs-example-modal-sm" id="borrowDeleteModal" tabindex="-1" role="dialog" aria-labelledby="mySmallModalLabel">
        <div class="modal-dialog modal-sm" role="document">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close" @click="clearTemp"><span aria-hidden="true">&times;</span></button>
                    <h4 class="modal-title">确认删除该借入记录？</h4>
                </div>

                <!-- 操作信息提示框 -->
                <div class="alert alert-danger alert-dismissable fade hide" role="alert" id="borrowDeleteF">
                    <strong>操作失败！</strong>{{ message.info }}
                </div>
                <div class="alert alert-success alert-dismissable fade hide" role="alert" id="borrowDeleteS">
                    <strong>操作成功！</strong>{{ message.info }}！
                </div>

                <div class="modal-body">
                    <div class="form-group">
                        <label>姓名：{{ tempBorrowListInfo.borrowinfo_user_truename }}</label><br>
                        <label>借入物品：{{ tempBorrowListInfo.borrowinfo_product_name }}</label><br>
                        <label>数量：{{ tempBorrowListInfo.borrowinfo_num }}</label><br>
                        <label>单价：￥{{ tempBorrowListInfo.borrowinfo_product_price }}</label><br>
                        <label>借入时间：{{ tempBorrowListInfo.borrowinfo_time }}</label><br>
                    </div>
                </div>

                <div class="modal-footer">
                    <button type="button" class="btn btn-default" data-dismiss="modal" @click="clearTemp">取消</button>
                    <button type="button" class="btn btn-danger" @click="deleteBorrow">确认删除</button>
                </div>
            </div>
        </div>
    </div>
</div>



</html>